class UserItemModelData {
  int? id;
  String? name;
  String? phone;

  UserItemModelData({
    this.id,
    this.name,
    this.phone,
  });
  UserItemModelData.fromJson(Map<String, dynamic> json) {
    id = json['id']?.toInt();
    name = json['name']?.toString();
    phone = json['phone']?.toString();
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['id'] = id;
    data['name'] = name;
    data['phone'] = phone;
    return data;
  }
}

class UserListModelData {
  int? limit;
  List<UserItemModelData?>? items;
  int? total;

  UserListModelData({this.limit, this.items, this.total});
  UserListModelData.fromJson(Map<String, dynamic> json) {
    limit = json['limit']?.toInt();
    if (json['items'] != null) {
      final v = json['items'];
      final arr0 = <UserItemModelData>[];
      v.forEach((v) {
        arr0.add(UserItemModelData.fromJson(v));
      });
      items = arr0;
    }
    total = json['total']?.toInt();
  }
  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['limit'] = limit;
    if (items != null) {
      final v = items;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v!.toJson());
      });
      data['items'] = arr0;
    }
    data['total'] = total;
    return data;
  }
}

class UserListModel {
  int? code;
  UserListModelData? data;
  String? message;

  UserListModel({this.code, this.data, this.message});
  UserListModel.fromJson(Map<String, dynamic> json) {
    code = json['code']?.toInt();
    data = (json['data'] != null)
        ? UserListModelData.fromJson(json['data'])
        : null;
    message = json['message']?.toString();
  }
  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['code'] = code;
    if (data != null) {
      data['data'] = this.data!.toJson();
    }
    data['message'] = message;
    return data;
  }
}
